package org.mog.album.service.impl;

import entity.pojo.Album;
import lombok.RequiredArgsConstructor;
import org.mog.album.mapper.AlbumMapper;
import org.mog.album.service.IAlbumService;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class AlbumService implements IAlbumService {
    private final AlbumMapper albumMapper;

    /**
     * 根据id查询专辑
     *
     * @param id
     * @return
     */
    @Override
    public Album getById(String id) {
        return albumMapper.getById(id);
    }

    /**
     * 新增专辑
     *
     * @param album
     */
    @Override
    public void insert(Album album) {
        albumMapper.insert(album);
    }
}
